<?php
include('includes/appInit.php');
$events  = new Events();
$library = new Library();

header('Content-type: text/xml; charset=UTF-8', true);
?>
<? echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rss version="2.0">
<channel>
	<? if ($_GET['type'] == 'event') { ?>
		<title>Events: Child Disability Connection</title>
		<link>http://www.childdisabilityconnection.org/events.php</link>
		<description></description>
		<lastBuildDate></lastBuildDate>
		<language>en-us</language>
		
		<? echo $events->getEventListRSS(); ?>
	<? } elseif ($_GET['type'] == 'library') { ?>
		<title>New Library Items: Child Disability Connection</title>
		<link>http://www.childdisabilityconnection.org/libraryView.php</link>
		<description></description>
		<lastBuildDate></lastBuildDate>
		<language>en-us</language>
		
		<? echo $library->getLibraryListRSS(); ?>
	<? } ?>	
</channel>
</rss>